﻿<script id="template-filter-combobox-options" type="text/x-jquery-tmpl">
    <option class="${classname}" value="${value}"{{if typeof def === "boolean" && def === true}} selected="selected"{{/if}}>
        ${title}
    </option>
</script>

<script id="template-filter-filtervalues" type="text/x-jquery-tmpl">
    <div class="advansed-item-list advansed-filter-list">
        <ul class="item-list filter-list"></ul>
    </div>
</script>

<script id="template-filter-sortervalues" type="text/x-jquery-tmpl">
    <div class="advansed-item-list advansed-sorter-list">
        <ul class="item-list sorter-list"></ul>
    </div>
</script>

<script id="template-filter-container" type="text/x-jquery-tmpl">

<div class="advansed-filter empty-filter-list">
    <div class="advansed-filter-wrapper">
        <div class="advansed-filter-support">
            <label class="advansed-filter-label">${ASC.Resources.Master.UserControlsCommonResource.LblFilter}</label>
            <label class="advansed-filter-hint"></label>
            <div class="advansed-filter-hint-popup-helper"><div class="advansed-filter-hint-popup popup_helper"></div></div>
        </div>
        <label class="advansed-filter-state btn-start-filter" title="${ASC.Resources.Master.ResourceJS.StartFilter}"></label>
        <div class="advansed-filter-sort-container">
            <span class="btn-toggle-sorter" title="${ASC.Resources.Master.ResourceJS.AscOrDesc}"></span>
            <span class="title">${ASC.Resources.Master.UserControlsCommonResource.LblSort}:&nbsp;<span class="value"></span></span>
        </div>


        <div class="advansed-item-list advansed-sorter-list"><ul class="item-list sorter-list"></ul></div>
        <div class="advansed-item-list advansed-filter-list"><ul class="item-list filter-list"></ul></div>
        <div class="advansed-filter-control advansed-filter-groupselector">
            <div class="advansed-filter-control-container advansed-filter-groupselector-container">
            </div>
        </div>

        <div class="advansed-filter-control advansed-filter-userselector">
            <div class="advansed-filter-control-container advansed-filter-userselector-container">

            </div>
        </div>

        <div class="advansed-filter-container">
                <div class="advansed-filter-filters empty-list">
                    <div class="btn-show-hidden-filters">${ASC.Resources.Master.UserControlsCommonResource.BtnHiddenFilter}</div>
                    <div class="hidden-filters-container">
                    </div>
                </div>
                <div class="advansed-filter-button btn-show-filters">
                    <div class="inner-text"><span class="text" title="${ASC.Resources.Master.ResourceJS.AddFilter}">+</span></div>
                </div>
                <div class="advansed-filter-input">
                    <label class="advansed-filter-reset btn-reset-filter">&times;</label>
                    <input class="advansed-filter advansed-filter-input advansed-filter-complete" type="text" placeholder="${ASC.Resources.Master.UserControlsCommonResource.LblFilterPlaceholder}" maxlength="255"/>
                </div>
            </div>
        {{if filtervalues.length > 0}}
            {{tmpl "template-filter-filtervalues"}}
        {{/if}}
        {{if sortervalues.length > 0}}
            {{tmpl "template-filter-sortervalues"}}
        {{/if}}
    </div>
    <div class="advansed-filter-helper"></div>
</div>
</script>

<script id="template-filter-item" type="text/x-jquery-tmpl">
<div class="default-value">
    <span class="title">{{if filtertitle}}${filtertitle}{{else}}${title}{{/if}}</span>
        <span class="selector-wrapper">
            <span class="daterange-selector from-daterange-selector">
                <span class="label">${ASC.Resources.Master.UserControlsCommonResource.LblFrom}</span>
                <span class="advansed-filter-dateselector-date dateselector-from-date">
                <span class="btn-show-datepicker btn-show-datepicker-container"><span class="btn-show-datepicker btn-show-datepicker-title"></span></span>
                <span class="advansed-filter-datepicker-container asc-datepicker">
                    <span class="datepicker-container"></span>
                </span>
            </span>
        </span>
        <span class="daterange-selector to-daterange-selector">
            <span class="label">${ASC.Resources.Master.UserControlsCommonResource.LblTo}</span>
            <span class="advansed-filter-dateselector-date dateselector-to-date">
                <span class="btn-show-datepicker btn-show-datepicker-container"><span class="btn-show-datepicker btn-show-datepicker-title"></span></span>
                <span class="advansed-filter-datepicker-container asc-datepicker">
                    <span class="datepicker-container"></span>
                </span>
            </span>
        </span>
        {{if options}}
        <span class="combobox-selector">
            <select class="advansed-filter-combobox"{{if $data.multiple === true}} multiple="multiple"{{/if}}>
                {{tmpl(options) "template-filter-combobox-options"}}
            </select>
        </span>
        {{/if}}
        <span class="group-selector">
            <span class="custom-value"><span class="inner-text"><span class="value"></span></span></span>
            <span class="default-value"><span class="inner-text"><span class="value">${ASC.Resources.Master.UserControlsCommonResource.LblSelect}</span></span></span>
        </span>
        <span class="person-selector">
            <span class="custom-value"><span class="inner-text"><span class="value"></span></span></span>
            <span class="default-value"><span class="inner-text"><span class="value">${ASC.Resources.Master.UserControlsCommonResource.LblSelect}</span></span></span>
        </span>
    </span>
    <span class="btn-delete">&times;</span>
</div>
</script>